import java.util.List;

/**
 * @author : cww
 * @date : 2021/1/24 14:49
 */
public class BookIterator implements IBookIterator{
   private BookList bookList;
   private int index;
   public BookIterator(BookList bookList){
      this.bookList = bookList;
      index = 0;
   }
   @Override
   public boolean hasNext() {
      return index<bookList.size();
   }

   @Override
   public Book next() {
      return bookList.get(index++);
   }
}
